/**
 * Created by pan on 2017/6/22.
 * 小说分类
 * 来源于hao123小说
 */

var express = require("express");
var router = express.Router();
var superagent = require("superagent");

router.get("/", function(req, res, next){
    superagent.get("http://m.hao123.com/hao123_api/novel/getClassifyData").end(function(err, response){
        if(err) {
            res.send({
                result: 0,
                msg: err
            });
        } else {
            res.send({
                result: 1,
                data: response.body.list
            });
        }
    });
});

module.exports = router;
